package lanQiao;

public class X10ToX16
{
	public static void main(String[] args)
	{
		int i=(new java.util.Scanner(System.in)).nextInt();
		
		if(i==0)
			System.out.println(i);
		else
		{
			String a="";
			for(;i>0;i/=16)
			{
				int t=i%16;
				a=(char)(t>9?t+55:t+48)+a;
			}
			
			System.out.println(a);
		}
	}

}
